<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  function Person() {
    this.hobby = '爱好';
  }

  Person.test1 = 'test1';

  Person.prototype.eat = function() {
    console.log('eat');
  }

  const person = new Person();
  console.log(person);
  console.log(Person.test1);
</script>
</body>
</html>